# centos6.6 java tomcat
FROM centos:6.6
MAINTAINER noday
RUN yum update -y
RUN yum install -y java
RUN yum install -y tar
RUN yum install -y wget
RUN yum install -y mysql-server
RUN service mysqld start&sleep 10;
RUN yum install -y unzip
RUN curl -O http://apache.fayea.com/tomcat/tomcat-7/v7.0.63/bin/apache-tomcat-7.0.63.tar.gz
RUN tar zxvf apache-tomcat-7.0.63.tar.gz
RUN wget http://222.73.85.164/zhao.zip
#RUN rm -rf /apache-tomcat-7.0.63/webapps/*
#RUN unzip /zhao.zip -d /apache-tomcat-7.0.63/webapps/ROOT
ENV TOMCAT_HOME /apache-tomcat-7.0.63
ENV CATALINA_HOME /apache-tomcat-7.0.63
RUN /etc/init.d/mysqld start& sleep 10;
#RUN /usr/bin/mysqladmin -u root password "123456"
#RUN /usr/bin/mysql -uroot -p123456 -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WHTH GRANT OPTION;"
#RUN /usr/bin/mysql -uroot -p123456 -e "source /apache-tomcat-7.0.63/webapps/ROOT/WEB-INF/classes/db/xiu.sql"
#ADD init.sh /init.sh
#RUN chmod +x /init.sh
#RUN /init.sh
EXPOSE 8080
CMD $CATALINA_HOME/bin/catalina.sh run